from Examples.DQNExamples.SlayTheSpire.SlayTheSpireBase import Monster


class Cultist(Monster):
    def __init__(self):
        super().__init__(max_hp=48, name='Cultist')
        self.base_damage = 6

    def action(self, turn_num, trigger, player):
        if turn_num == 1:
            self.incantation(trigger)
        else:
            self.attack(player)

    def incantation(self, trigger):
        monster_action_down = trigger.get('monster_action_down')
        monster_action_down.append(
            {
                'trigger': self.add_incantation,
                'trigger_args': ()
            }
        )

    def add_incantation(self):
        self.buffer[5] += 4

    def reset(self):
        super().reset()
        self.base_damage = 6
